<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        div.main {
            width: 100%;
            height: 560px;
            background: gray;
        }

        div.black {
            width: 280px;
            height: 300px;
            background: rgba(0, 0, 0, .2);
            margin-left: 60%;
            margin-top: 160px;
        }

        /*先把table的宽度扩大，table的属性是根据内部的元素大小决定大小的*/
        div.black table {
            width: 100%;
        }

        #uname, #upwd, #btn {
            width: 100%;
            height: 34px;
            /*border: 0 取消边框*/
            border: 0;
            /*取消轮廓*/
            outline: 0;
        }

        /*调整输入框的间距*/
        #upwd, #btn {
            margin-top: 20px;
        }

        h4 {
            /*颜色设为白色*/
            color: #fff;
        }

        /*改变字体大小*/
        table tr td a, td.login {
            color: #fff;
            /*去掉下划线*/
            text-decoration: none;
            /*字体大小*/
            font-size: 12px;
        }

        #btn {
            background: #0aa1ed;
        }

        h4 {
            margin-bottom: 8px;
        }

        div.main {
            background: url("./img/bg.png");
        }

        #uname, #upwd {
            padding-left: 20px;
            background: #fff url("./img/yhm.png") no-repeat 97% center;
            box-sizing: border-box;
        }

        #upwd {
            background-image: url('./img/mm.png');
        }
    </style>
</head>
<body>
<div class="main">
    <table></table>
    <div class="black">

        <table>
            <tr>
                <td><h4>登录学子商城</h4></td>
                <td><a href="">新用户注册</a></td>
            </tr>
            <tr>
                <td colspan="2">
                    <hr>
                </td>
            </tr>
            <tr>
                <td colspan="2">
                    <input type="text" placeholder="输入账号" id="uname">
                </td>
            </tr>
            <tr>
                <td colspan="2"><input type="password" id="upwd" placeholder="请输入密码"></td>
            </tr>
            <tr>
                <td class="login"><input type="checkbox">自动登录</td>
                <td>
                    <a href="#">忘记密码?</a>
                </td>
            </tr>
            <tr>
                <td colspan="2">
                    <input type="submit" value="登录" id="btn">
                </td>
            </tr>
        </table>
    </div>
</div>
</body>
</html>